//
//  EFTopTypeCell.m
//  EnjogFood
//
//  Created by 王芳 on 17/5/30.
//  Copyright © 2017年 wf. All rights reserved.
//

#import "EFTopTypeCell.h"

@interface EFTopTypeCell ()
@property (strong, nonatomic) UILabel *titleLabel;
@end

@implementation EFTopTypeCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self.contentView addSubview:self.titleLabel];
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

- (void)setContent:(NSString *)str{
    self.titleLabel.text = str;
    [self.titleLabel sizeToFit];
    self.titleLabel.left = 15;
    self.titleLabel.top = (35 - self.titleLabel.height)/2;
}

- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.font = [UIFont systemFontOfSize:13];
        _titleLabel.textColor = kBlack666;
    }
    return _titleLabel;
}

@end
